package com.huiquan.vocab.constant;

import java.util.HashMap;
import java.util.Map;

public class TQuanzationRule {

	/* t量化默认数量：3. */
	public static Integer DEFAULT_T_NUMBER = 3;
	/* t量化默认数量-半：0.5. */
	public static Double DEFAULT_T_NUMBER_BAN = 0.5;

	public static String ignoreRegex = null;
	public static Map<String, String> replaceMap = new HashMap<>();
	public static String unitRegex = null;
	public static String separatorRegex = null;
	public static String numCHRegex = null;
	public static Map<String, String> specialMap = new HashMap<>();
	public static Map<String, String> numCHChangeMap = new HashMap<>();
	public static Map<String, Double> unitMutipleMap = new HashMap<>();

	static {
		specialMap.put("昨天", "1");
		specialMap.put("昨日", "1");
		specialMap.put("前天", "2");
		specialMap.put("前日", "2");
		specialMap.put("上周", "7");
		specialMap.put("去年", "365");
		specialMap.put("前年", "730");

		replaceMap.put("Y", "年");
		replaceMap.put("w", "周");
		replaceMap.put("W", "周");
		replaceMap.put("T", "天");
		replaceMap.put("h", "时");
		replaceMap.put("H", "时");
		replaceMap.put("两", "二");
		replaceMap.put("俩", "二");
		replaceMap.put("壹", "一");
		replaceMap.put("贰", "二");
		replaceMap.put("叁", "三");
		replaceMap.put("肆", "四");
		replaceMap.put("伍", "五");
		replaceMap.put("陆", "六");
		replaceMap.put("柒", "七");
		replaceMap.put("捌", "八");
		replaceMap.put("玖", "九");

		ignoreRegex = "[左后右内多余个约第小钟来若干]";

		unitRegex = "年、月、周、日、天、时、刻、分、秒".replace("、", "|");

		separatorRegex = "\\~ -- —— — 、 -".replace(" ", "|");

		numCHRegex = "[一二三四五六七八九]";

		numCHChangeMap.put("壹", "一");
		numCHChangeMap.put("贰", "二");
		numCHChangeMap.put("叁", "三");
		numCHChangeMap.put("肆", "四");
		numCHChangeMap.put("伍", "五");
		numCHChangeMap.put("陆", "六");
		numCHChangeMap.put("柒", "七");
		numCHChangeMap.put("捌", "八");
		numCHChangeMap.put("玖", "九");
		
		unitMutipleMap.put("年", 365.0);
		unitMutipleMap.put("月", 30.0);
		unitMutipleMap.put("日", 1.0);
		unitMutipleMap.put("天", 1.0);
		unitMutipleMap.put("周", 7.0);
		unitMutipleMap.put("时", 1.0 / 24);
		unitMutipleMap.put("刻", 15.0 / 60 / 24);
		unitMutipleMap.put("分", 1.0 / 60 / 24);
		unitMutipleMap.put("秒", 1.0 / 60 / 60 / 24);

	}
}
